From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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://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: Tue Mar 14 23:21:45 2006 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://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: Tue Mar 14 23:21:45 2006 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: Tue Mar 14 23:21:45 2006 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://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: Tue Mar 14 23:21:45 2006 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 peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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://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: Tue Mar 28 18:25:04 2006 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://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: Tue Mar 28 18:25:04 2006 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: Tue Mar 28 18:25:04 2006 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://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: Tue Mar 28 18:25:04 2006 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 peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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://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: Tue Mar 28 20:17:05 2006 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://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: Tue Mar 28 20:17:05 2006 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: Tue Mar 28 20:17:05 2006 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://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: Tue Mar 28 20:17:05 2006 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 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 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 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 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 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 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 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 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 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-0011.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-0011.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-0011.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-0011.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-0011.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 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-0012.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-0012.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-0012.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-0012.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-0012.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 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-0013.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-0013.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-0013.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-0013.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-0013.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 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-0014.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-0014.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-0014.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-0014.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-0014.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 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-0015.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-0015.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-0015.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-0015.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-0015.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 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-0016.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-0016.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-0016.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-0016.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-0016.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 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-0017.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-0017.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-0017.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-0017.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-0017.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 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-0018.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-0018.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-0018.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-0018.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-0018.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 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-0019.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-0019.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-0019.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-0019.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-0019.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 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-0020.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-0020.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-0020.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-0020.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-0020.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 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-0021.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-0021.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-0021.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-0021.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-0021.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 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-0022.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-0022.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-0022.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-0022.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-0022.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 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-0023.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-0023.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-0023.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-0023.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-0023.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 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-0024.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-0024.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-0024.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-0024.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-0024.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 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-0025.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-0025.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-0025.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-0025.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-0025.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 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-0026.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-0026.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-0026.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-0026.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-0026.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 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-0027.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-0027.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-0027.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-0027.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-0027.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 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-0028.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-0028.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-0028.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-0028.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-0028.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 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-0029.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-0029.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-0029.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-0029.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-0029.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 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-0030.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-0030.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-0030.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-0030.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-0030.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 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-0031.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-0031.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-0031.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-0031.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-0031.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 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-0032.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-0032.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-0032.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-0032.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-0032.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 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-0033.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-0033.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-0033.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-0033.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-0033.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 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-0034.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-0034.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-0034.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-0034.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-0034.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 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-0035.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-0035.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-0035.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-0035.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-0035.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 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-0036.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-0036.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-0036.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-0036.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-0036.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 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-0037.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-0037.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-0037.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-0037.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-0037.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 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-0038.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-0038.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-0038.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-0038.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-0038.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 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-0039.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-0039.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-0039.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-0039.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-0039.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 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-0040.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-0040.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-0040.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-0040.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-0040.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 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-0041.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-0041.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-0041.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-0041.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-0041.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 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-0042.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-0042.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-0042.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-0042.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-0042.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 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-0043.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-0043.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-0043.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-0043.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-0043.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 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-0044.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-0044.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-0044.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-0044.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-0044.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 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-0045.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-0045.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-0045.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-0045.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-0045.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 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-0046.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-0046.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-0046.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-0046.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-0046.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 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-0047.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-0047.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-0047.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-0047.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-0047.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 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-0048.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-0048.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-0048.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-0048.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-0048.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 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-0049.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-0049.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-0049.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-0049.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-0049.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 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-0050.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-0050.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-0050.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-0050.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-0050.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 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-0051.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-0051.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-0051.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-0051.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-0051.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 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-0052.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-0052.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-0052.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-0052.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-0052.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 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-0053.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-0053.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-0053.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-0053.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-0053.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 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-0054.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-0054.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-0054.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-0054.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-0054.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 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-0055.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-0055.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-0055.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-0055.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-0055.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 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-0056.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-0056.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-0056.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-0056.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-0056.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 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-0057.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-0057.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-0057.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-0057.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-0057.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 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-0058.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-0058.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-0058.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-0058.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-0058.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 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-0059.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-0059.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-0059.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-0059.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-0059.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 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-0060.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-0060.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-0060.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-0060.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-0060.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 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-0061.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-0061.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-0061.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-0061.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-0061.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 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-0062.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-0062.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-0062.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-0062.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-0062.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 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-0063.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-0063.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-0063.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-0063.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-0063.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 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-0064.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-0064.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-0064.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-0064.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-0064.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 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-0065.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-0065.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-0065.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-0065.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-0065.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 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-0066.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-0066.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-0066.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-0066.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-0066.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 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-0067.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-0067.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-0067.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-0067.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-0067.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 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-0068.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-0068.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-0068.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-0068.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-0068.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 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-0069.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-0069.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-0069.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-0069.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-0069.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 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-0070.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-0070.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-0070.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-0070.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-0070.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 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-0071.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-0071.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-0071.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-0071.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-0071.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 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-0072.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-0072.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-0072.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-0072.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-0072.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 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-0073.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-0073.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-0073.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-0073.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-0073.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 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-0074.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-0074.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-0074.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-0074.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-0074.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 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-0075.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-0075.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-0075.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-0075.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-0075.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 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-0076.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-0076.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-0076.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-0076.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-0076.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 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-0077.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-0077.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-0077.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-0077.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-0077.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 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-0078.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-0078.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-0078.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-0078.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-0078.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 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-0079.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-0079.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-0079.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-0079.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-0079.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 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-0080.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-0080.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-0080.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-0080.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-0080.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 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-0081.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-0081.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-0081.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-0081.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-0081.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 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-0082.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-0082.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-0082.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-0082.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-0082.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 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-0083.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-0083.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-0083.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-0083.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-0083.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 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-0084.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-0084.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-0084.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-0084.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-0084.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 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-0085.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-0085.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-0085.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-0085.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-0085.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 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-0086.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-0086.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-0086.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-0086.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-0086.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 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-0087.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-0087.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-0087.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-0087.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-0087.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 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-0088.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-0088.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-0088.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-0088.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-0088.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 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-0089.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-0089.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-0089.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-0089.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-0089.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 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-0090.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-0090.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-0090.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-0090.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-0090.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 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-0091.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-0091.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-0091.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-0091.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-0091.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 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-0092.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-0092.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-0092.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-0092.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-0092.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 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-0093.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-0093.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-0093.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-0093.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-0093.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 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-0094.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-0094.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-0094.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-0094.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-0094.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 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-0095.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-0095.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-0095.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-0095.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-0095.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 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-0096.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-0096.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-0096.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-0096.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-0096.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 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-0097.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-0097.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-0097.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-0097.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-0097.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 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-0098.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-0098.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-0098.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-0098.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-0098.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 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-0099.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-0099.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-0099.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-0099.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-0099.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 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-0100.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-0100.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-0100.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-0100.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-0100.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 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-0101.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-0101.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-0101.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-0101.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-0101.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 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-0102.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-0102.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-0102.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-0102.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-0102.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 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-0103.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-0103.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-0103.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-0103.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-0103.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 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-0104.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-0104.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-0104.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-0104.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-0104.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 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-0105.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-0105.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-0105.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-0105.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-0105.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 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-0106.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-0106.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-0106.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-0106.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-0106.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 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-0107.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-0107.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-0107.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-0107.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-0107.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 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-0108.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-0108.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-0108.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-0108.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-0108.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 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-0109.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-0109.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-0109.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-0109.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-0109.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 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-0110.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-0110.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-0110.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-0110.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-0110.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 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-0111.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-0111.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-0111.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-0111.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-0111.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 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-0112.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-0112.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-0112.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-0112.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-0112.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 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-0113.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-0113.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-0113.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-0113.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-0113.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 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-0114.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-0114.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-0114.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-0114.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-0114.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 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-0115.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-0115.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-0115.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-0115.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-0115.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 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-0116.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-0116.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-0116.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-0116.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-0116.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 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-0117.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-0117.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-0117.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-0117.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-0117.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 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-0118.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-0118.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-0118.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-0118.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-0118.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 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-0119.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-0119.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-0119.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-0119.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-0119.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 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-0120.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-0120.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-0120.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-0120.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-0120.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 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-0121.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-0121.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-0121.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-0121.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-0121.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 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-0122.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-0122.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-0122.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-0122.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-0122.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 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-0123.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-0123.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-0123.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-0123.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-0123.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 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-0124.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-0124.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-0124.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-0124.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-0124.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 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-0125.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-0125.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-0125.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-0125.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-0125.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 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-0126.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-0126.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-0126.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-0126.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-0126.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 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-0127.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-0127.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-0127.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-0127.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-0127.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 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-0128.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-0128.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-0128.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-0128.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-0128.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 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-0129.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-0129.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-0129.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-0129.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-0129.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 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-0130.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-0130.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-0130.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-0130.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-0130.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 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-0131.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-0131.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-0131.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-0131.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-0131.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 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-0132.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-0132.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-0132.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-0132.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-0132.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 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-0133.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-0133.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-0133.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-0133.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-0133.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 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-0134.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-0134.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-0134.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-0134.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-0134.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 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-0135.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-0135.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-0135.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-0135.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-0135.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 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-0136.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-0136.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-0136.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-0136.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-0136.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 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-0137.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-0137.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-0137.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-0137.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-0137.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 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-0138.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-0138.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-0138.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-0138.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-0138.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 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-0139.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-0139.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-0139.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-0139.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-0139.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 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-0140.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-0140.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-0140.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-0140.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-0140.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 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-0141.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-0141.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-0141.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-0141.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-0141.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 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-0142.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-0142.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-0142.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-0142.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-0142.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 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-0143.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-0143.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-0143.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-0143.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-0143.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 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-0144.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-0144.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-0144.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-0144.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-0144.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 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-0145.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-0145.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-0145.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-0145.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-0145.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 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-0146.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-0146.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-0146.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-0146.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-0146.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 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-0147.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-0147.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-0147.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-0147.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-0147.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 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-0148.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-0148.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-0148.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-0148.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-0148.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 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-0149.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-0149.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-0149.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-0149.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-0149.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 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-0150.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-0150.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-0150.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-0150.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-0150.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 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-0151.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-0151.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-0151.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-0151.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-0151.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 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-0152.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-0152.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-0152.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-0152.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-0152.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 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-0153.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-0153.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-0153.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-0153.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-0153.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 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-0154.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-0154.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-0154.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-0154.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-0154.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 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-0155.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-0155.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-0155.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-0155.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-0155.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 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-0156.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-0156.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-0156.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-0156.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-0156.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 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-0157.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-0157.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-0157.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-0157.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-0157.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 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-0158.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-0158.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-0158.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-0158.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-0158.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 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-0159.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-0159.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-0159.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-0159.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-0159.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 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-0160.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-0160.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-0160.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-0160.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-0160.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 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-0161.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-0161.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-0161.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-0161.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-0161.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 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-0162.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-0162.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-0162.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-0162.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-0162.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 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-0163.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-0163.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-0163.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-0163.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-0163.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 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-0164.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-0164.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-0164.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-0164.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-0164.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 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-0165.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-0165.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-0165.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-0165.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-0165.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 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-0166.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-0166.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-0166.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-0166.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-0166.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 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-0167.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-0167.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-0167.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-0167.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-0167.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 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-0168.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-0168.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-0168.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-0168.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-0168.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 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-0169.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-0169.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-0169.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-0169.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-0169.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 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-0170.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-0170.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-0170.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-0170.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-0170.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 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-0171.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-0171.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-0171.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-0171.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-0171.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 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-0172.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-0172.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-0172.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-0172.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-0172.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 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-0173.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-0173.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-0173.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-0173.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-0173.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 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-0174.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-0174.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-0174.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-0174.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-0174.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 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-0175.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-0175.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-0175.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-0175.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-0175.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 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-0176.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-0176.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-0176.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-0176.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-0176.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 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-0177.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-0177.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-0177.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-0177.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-0177.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 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-0178.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-0178.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-0178.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-0178.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-0178.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 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-0179.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-0179.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-0179.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-0179.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-0179.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 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-0180.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-0180.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-0180.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-0180.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-0180.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 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-0181.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-0181.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-0181.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-0181.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-0181.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 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-0182.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-0182.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-0182.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-0182.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-0182.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 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-0183.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-0183.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-0183.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-0183.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. > >