From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 14 23:21:54 2006 Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 14 23:21:54 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 14 23:21:54 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:54 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj@www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 28 18:25:15 2006 Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 28 18:25:15 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 28 18:25:15 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:15 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj@www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 28 20:17:13 2006 Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 28 20:17:13 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Tue Mar 28 20:17:13 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:13 2006 Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj@www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk From chrisn at cisco.com Fri Aug 20 11:35:58 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 10:35:58 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing Message-ID: Hi, I've installed rxtx on a Mac OS X system and can successfully run the SerialDemo app from the commapi distribution, and communicate via my Keyspan adapter. However, my own application (which is not event-based) is not working. I can open the port with the same params as I used from SerialDemo, and can write to the stream but the following read() is not returning anything. I have disabled receive timeouts but the read is still exiting without data (returning -1). Any ideas what might be the issue here? Thanks, Chris From chrisn at cisco.com Fri Aug 20 12:09:17 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 11:09:17 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I also want to add that repeated read()'s still do not return any data... Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > > Thanks, > > Chris > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From chrisn at cisco.com Fri Aug 20 13:33:31 2004 From: chrisn at cisco.com (Chris Norris) Date: Fri, 20 Aug 2004 12:33:31 -0700 (PDT) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: I've experimented further and found that I can workaround the issue by setting the receive timeout to Integer.MAX_INT. So, it looks like disableReceiveTimeout() is not supported (or is broken)? I'd be interested in hearing if there is any way I can remove this workaround and rely on the normal receive timeout processing? Thanks, Chris On Fri, 20 Aug 2004, Chris Norris wrote: > > I also want to add that repeated read()'s still do not return any data... > > Chris > > On Fri, 20 Aug 2004, Chris Norris wrote: > > > > > Hi, > > > > I've installed rxtx on a Mac OS X system and can successfully run the > > SerialDemo app from the commapi distribution, and communicate via my > > Keyspan adapter. > > > > However, my own application (which is not event-based) is not working. I > > can open the port with the same params as I used from SerialDemo, and can > > write to the stream but the following read() is not returning anything. > > I have disabled receive timeouts but the read is still exiting without > > data (returning -1). > > > > Any ideas what might be the issue here? > > > > Thanks, > > > > Chris > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > From taj at www.linux.org.uk Fri Aug 20 17:19:18 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 21 Aug 2004 00:19:18 +0100 (BST) Subject: [Rxtx] Mac OS X non-event-based processing In-Reply-To: References: Message-ID: On Fri, 20 Aug 2004, Chris Norris wrote: > > Hi, > > I've installed rxtx on a Mac OS X system and can successfully run the > SerialDemo app from the commapi distribution, and communicate via my > Keyspan adapter. > > However, my own application (which is not event-based) is not working. I > can open the port with the same params as I used from SerialDemo, and can > write to the stream but the following read() is not returning anything. > I have disabled receive timeouts but the read is still exiting without > data (returning -1). > > Any ideas what might be the issue here? > Hmm. I see with SerialImp.c/line 3038 the following lines: /* TESTING ttyset.c_cc[ VMIN ] = threshold; */ ttyset.c_cc[ VMIN ] = 0; This is wrong - especially for what you are trying to do. The first line should be used and the second removed. This will enable reads to wait for thresh bytes when set with enableReceiveThreshold( int thresh ); Thanks for bringing this up. It looks like a simple test slipped into SerialImp.c. -- Trent Jarvi taj at www.linux.org.uk